﻿<%@ Page Language="C#" AutoEventWireup="True" 
    CodeBehind="ModifyPasswordWindow.aspx.cs" 
    Inherits="Medianamik.UI.Web.ModifyPasswordWindow" 
    MasterPageFile="~/Medianamik/MasterPages/MedianamikModalWindow.Master" %>

<asp:Content ID="HeaderContentHolder" runat="server" ContentPlaceHolderID="HeaderContentHolder">
	<script type="text/javascript">
        //<![CDATA[
        function GetRadWindow()
        {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow;
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
            return oWindow;
        }

        function Cancel_Clicked()
        {
            var oWindow = GetRadWindow();
            oWindow.argument = null;
            oWindow.Close();
        }
        //]]>            
	</script>
</asp:Content>

<asp:Content ID="CenterContent" ContentPlaceHolderID="CenterContent" runat="server">
	<fieldset>
	    <asp:PlaceHolder ID="phrMain" runat="server">
		    <asp:ValidationSummary ID="valSummary" HeaderText="<%$Resources: Medianamik_Global, ValidationSummaryHeader %>" CssClass="ValidationSummary" runat="server" />
		    <p>
		        <label for="<%= txtOldPassword.ClientID %>"><asp:Literal ID="Literal1" runat="server" Text="<%$Resources: Medianamik_ModalWindows, ModifyPassword_OldPasswordLabel %>" /><asp:RequiredFieldValidator runat="server" ID="rfvOldPassword" ControlToValidate="txtOldPassword" ErrorMessage="<%$Resources: Medianamik_ModalWindows, ModifyPassword_OldPasswordRequiredErrorMessage %>" Text=" *" CssClass="TxtErreur" /><asp:CustomValidator ID="cvOldPassword" ControlToValidate="txtOldPassword" runat="server" ErrorMessage="<%$Resources: Medianamik_ModalWindows, ModifyPassword_InvalidOldPasswordErrorMessage %>" EnableClientScript="false" Text=" *" OnServerValidate="cvOldPassword_ServerValidate" /></label>
		        <asp:TextBox ID="txtOldPassword" TextMode="Password" runat="server" style="width:200px;" CssClass="TxtBox" />
		    </p>
		    <p>
		        <label for="<%= txtNewPassword.ClientID %>"><asp:Literal ID="Literal4" runat="server" Text="<%$Resources: Medianamik_ModalWindows, ModifyPassword_NewPasswordLabel %>" /><asp:RequiredFieldValidator ID="rfvNewPassword" runat="server" EnableClientScript="true" ControlToValidate="txtNewPassword" ErrorMessage="<%$Resources: Medianamik_ModalWindows, ModifyPassword_NewPasswordRequiredErrorMessage %>" Text=" *" CssClass="TxtErreur" /><asp:CustomValidator ID="cvPasswordStrength" ControlToValidate="txtNewPassword" runat="server" ErrorMessage="<%$Resources: Medianamik_SecurityManagement, PasswordStrengthError %>" Text=" *" EnableClientScript="false"  OnServerValidate="cvPasswordStrength_ServerValidate" /></label>
		        <asp:TextBox ID="txtNewPassword" TextMode="Password" runat="server" style="width:200px;" CssClass="TxtBox" />
		    </p>
		    <p>
		        <label for="<%= txtNewConfirmedPassword.ClientID %>"><asp:Literal ID="Literal5" runat="server" Text="<%$Resources: Medianamik_ModalWindows, ModifyPassword_NewPasswordConfirmationLabel %>" /><asp:RequiredFieldValidator ID="rfvNewConfirmedPassword" runat="server" EnableClientScript="true" ControlToValidate="txtNewConfirmedPassword" ErrorMessage="<%$Resources: Medianamik_ModalWindows, ModifyPassword_NewPasswordConfirmationRequiredErrorMessage %>" Text=" *" CssClass="TxtErreur" Display="Dynamic" /><asp:CompareValidator ID="comNewConfirmedPassword" runat="server" EnableClientScript="true" ControlToValidate="txtNewConfirmedPassword" ControlToCompare="txtNewPassword" ErrorMessage="<%$Resources: Medianamik_ModalWindows, ModifyPassword_NewPasswordCompareErrorMessage %>" Text=" *" CssClass="TxtErreur" /></label>
		        <asp:TextBox ID="txtNewConfirmedPassword" TextMode="Password" runat="server" style="width:200px;" CssClass="TxtBox" />
		    </p>
		    <strong><asp:Literal ID="Literal6" runat="server" Text="<%$ Resources: Medianamik_SecurityManagement, PasswordRulesLabel %>"></asp:Literal></strong><br />
	       <ul>
	        <li><asp:Literal ID="Literal7" runat="server" Text="<%$Resources: Medianamik_SecurityManagement, MinRequiredPasswordLength %>"></asp:Literal>&nbsp;<strong><%= Membership.MinRequiredPasswordLength  %></strong></li>
	        <li><asp:Literal ID="Literal8" runat="server" Text="<%$Resources: Medianamik_SecurityManagement, MinRequiredNonAlphanumericCharacters %>"></asp:Literal>&nbsp;<strong><%= Membership.MinRequiredNonAlphanumericCharacters  %></strong></li>
	       </ul>
		    <p><asp:Button ID="btnModify" runat="server" OnClick="btnModify_Click" Text="<%$Resources: Medianamik_Global, ModifyButton %>" CssClass="Btn" />&nbsp;&nbsp;<asp:Button ID="btnCancel" runat="server" Text="<%$Resources: Medianamik_Global, Cancel %>" CssClass="Btn" OnClientClick="Cancel_Clicked();" /></p>
	        <p><asp:Literal ID="Literal3" runat="server" Text="<%$Resources: Medianamik_Global, AllRequiredField %>" /></p>
	    </asp:PlaceHolder>
	    <asp:PlaceHolder ID="phrConfirmation" Visible="false" runat="server">
	        <p><asp:Literal ID="Literal2" runat="server" Text="<%$Resources: Medianamik_ModalWindows, ModifyPassword_SuccessText %>" /></p>
	    </asp:PlaceHolder>
	</fieldset>
</asp:Content>
